<template>
  <div class="specialist-detail ct">
    <el-breadcrumb class="head-nav" :separator-icon="ArrowRight">
      <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item :to="{ path: '/nsqa' }">驻站专家</el-breadcrumb-item>
      <el-breadcrumb-item>专家详情</el-breadcrumb-item>
    </el-breadcrumb>
    <div class="detail-content">
      <div class="content-l">
        <div class="l-t">
          <img :src="intro.photo" alt="">
          <div class="t-name">{{ intro?.name }}</div>
          <!-- <div class="t-ingo">{{ intro?.professorTypeName }}</div> -->
          <div class="l-b">
          <div>{{ intro?.workUnit }}</div>
          
          <!-- <div class="o">所在地：{{ 1 }}</div> -->
        </div>
      </div>
      <div class="l-bb">
            {{ intro?.courtyardName }}
          </div>
      </div>
      <div class="content-r">
        <div class="cc">
          <div class="tt">个人简介</div>
          <div class="bb">{{ intro?.intro }}</div>
        </div>
        <!-- <div class="cc">
          <div class="tt">研究领域</div>
          <div class="bb">{{ intro?.researchField }}</div>
        </div>
        <div class="cc">
          <div class="tt">社会职务</div>
          <div class="bb">{{ intro?.position }}</div>
        </div> -->
      </div>
    </div>
  </div>
</template>
<script setup>
import { ArrowRight } from '@element-plus/icons-vue'
import { getProfessorById } from '@/api/home'
import { useRouter } from 'vue-router';
import { computed, ref } from 'vue';

const router = useRouter();
const id = computed(()=>router?.currentRoute?.value?.params.id)
const intro = ref({})
const yardId = computed(() => router?.currentRoute?.value?.query.yardId)

init()
async function init(){
  const { data } = await getProfessorById({professorId:id.value});
  intro.value = data;
  console.log('---data', data)
}


</script>
<style lang="scss" scoped>
  .specialist-detail {
    width: 100%;
    color: #777;
    padding: 0 10%;
    background: #f5f5f5 url('../../assets/job/6.png') no-repeat 0 200px;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .head-nav {
    height: 125px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-size: 24px;
    width: 100%;
  }
  .detail-content {
    width: 100%;
    margin-bottom: 60px;
    flex: 1;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    .content-l {
      width: 305px;
      margin-right: 30px;
      background-color: #fff;
      display: flex;
      flex-direction: column;
      .l-t {
        height: 370px;
        width: 100%;
        background: url(../../assets/speciallist/2.png) no-repeat center / cover;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: #fff;

        img {
          height: 220px;
          width: 180px;
        }
        .t-name {
          font-size: 30px;
          font-weight: bold;
          padding: 10px 0 5px 0;
        }
        .t-ingo {
          font-size: 20px;
        }
      }
      .l-b {
        text-align: center;
        padding: 0px;
        font-size: 18px;
        color: white;
        line-height: 28px;
        // flex: 1;
        overflow: hidden;
        
      }
      .l-bb {
          font-size: 18px;
          color: black;
          text-align: center;
          padding-top: 25px;
          padding-bottom: 20px;
          // line-height: 0px;
          
        }
    }
    .content-r {
      flex: 1;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      .cc {
        background-color: #fff;
        width: 100%;
        min-height: 160px;
        padding: 20px 40px;
        margin-bottom: 20px;
        border-radius: 10px;
        .tt {
          font-weight: bold;
          font-size: 28px;
          color: #068043;
        }
        .bb {
          line-height: 30px;
          color: #666;
          font-size: 18px;
          padding-top: 10px;
        }
      }
    }
  }
</style>